package org.dwell.vertx3.demos.consumer;

import io.vertx.core.AbstractVerticle;
import io.vertx.core.Context;
import io.vertx.core.Vertx;

/**
 * Created by JianGuo on 2016/1/18.
 */
public class ProviderVerticle extends AbstractVerticle {

    private Vertx vertx;

    @Override
    public void start() throws Exception {
        vertx.eventBus().send("news.uk.sport", "Yay! Someone kicked a ball.11111111");
    }

    @Override
    public void init(Vertx vertx, Context context) {
        this.vertx = vertx;
    }


    public static void main(String[] args) {
        Vertx vertx = Vertx.vertx();
        vertx.deployVerticle(new ProviderVerticle());
    }
}
